<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252" />
<title>Shop</title>
<link rel="stylesheet" type="text/css" href="css/style.css" />
<!--[if IE 6]>
<link rel="stylesheet" type="text/css" href="css/iecss.css" />
<![endif]-->
<script type="text/javascript" src="js/boxOver.js"></script>
</head>
<body>
<div id="main_content"> 
   
            <div id="menu_tab">
            <div class="left_menu_corner"></div>
                    <ul class="menu">
                         <li><a href="#" class="nav1">  Home </a></li>
                         <li class="divider"></li>
                    </ul>

             <div class="right_menu_corner"></div>
            </div><!-- end of menu tab -->
            
  <div class="right_content">
   		<div class="shopping_cart">
        	<div class="cart_title">Shopping cart</div>
            
            <div class="cart_details">
            3 items <br />
            <span class="border_cart"></span>
            Total: <span class="price">350$</span>
            </div>
            
            <div class="cart_icon"><a href="#" title="header=[Checkout] body=[&nbsp;] fade=[on]"><img src="cart.png" alt="" title="" width="48" height="48" border="0" /></a></div>
        
        </div>
		</div>
<?php
//Authors of this code include Saori Takasaki and Jon Rivera.
        
include 'product_data.inc';

//This form will direct users to the login page.
echo "<form action = 'login.php' method = 'post'>" ;
//This displays the first row of the table.
print '<table border="1" cellpadding="5" cellspacing="0">' ;
print '<th>Product</th> <th>Name</th> <th>Price</th> <th>Quantity</th><th>Cart</th>';

//This displays the table with a for loop.
for ($i= 0; $i < count($products); $i++)
    
	{
		 print '<tr>';
		 print "<td>{$products[$i]['Product']}</td>";
		 print "<td>{$products[$i]['Name']}</td>";
		 print "<td>{$products[$i]['Price']}</td>";
		 print "<td><input type= 'text' name= 'quantity$i'>";
		 print "<td> <a href='#' title='Add to cart'><img src='cart.png'></a>";
		 print '</tr>';

	}

	print '</table>';

print "<br>";

// This creates a submit button that users use to send data.
print "<input type= 'submit' name= 'submit_button' value= 'Submit'>";

echo "</form>";
?>


